﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Default.Master" CodeBehind="Noticias.aspx.vb" Inherits="ICLI.Noticias" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Notícias</h2>
    <table style="width: 100%" cellpadding="0" cellspacing="0">
        <tr>
            <td style="width: 30%">
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="GridView1" runat="server" 
                    AutoGenerateColumns="False" CssClass="textoNoticia"
                    BorderColor="#E2F0F1" BorderStyle="Solid" BorderWidth="2px" 
                    DataKeyNames="IDNoticia" DataSourceID="AccessNoticias"
                    Width="100%" GridLines="None" PageSize="20" AllowPaging="True" Font-Italic="False"
                    Height="180px">
                    <PagerSettings PageButtonCount="5" />
                    <RowStyle Height="20px" />
                    <Columns>
                        <asp:TemplateField HeaderText="Últimas Notícias">
                            <ItemTemplate>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td valign="top" style="width: 5%;">
                                            <asp:Label ID="lblIDNoticia" runat="server" Text='<%# Eval("IDNoticia") %>' Visible="False"></asp:Label>
                                        </td>
                                        <td valign="top" style="height: 20px;">
                                            <asp:HyperLink ID="hplTitulo" runat="server" NavigateUrl='<%# "VisualizaNoticia.aspx?IDnoticia=" & Eval("IDNoticia") %>'
                                                Text='<%# Eval("Titulo") %>'></asp:HyperLink>
                                            <asp:Label ID="lblManchete" runat="server" Text='<%# Eval("Manchete") %>' Visible="False"></asp:Label>
                                        </td>
                                        <td valign="top">
                                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "VisualizaNoticia.aspx?IDnoticia=" & Eval("IDNoticia") %>'
                                                Visible="False">Mais...</asp:HyperLink>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle Height="15px" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" />
                    <HeaderStyle CssClass="headerNoticia" HorizontalAlign="Left" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="width: 30%">
                </td>
            <td>
                </td>
        </tr>
    </table>
    <asp:AccessDataSource ID="AccessNoticias" runat="server" DataFile="~/App_Data/Banco.mdb"
        SelectCommand="SELECT * FROM [Noticias] ORDER BY [Data] DESC"></asp:AccessDataSource>
</asp:Content>

